/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package BoardAttribute;

import engineMoving.Point;

/**
 *
 * @author User
 */
public class Tangga {
    private Point posisiAtas;
    private Point posisiBawah;
    private int [][] arrayBoard;
    
    public void setPosisi1(int [][] arrayBoard){
        arrayBoard[9][8]=2;
        arrayBoard[7][1]=2;
        arrayBoard[4][3]=2;
        arrayBoard[3][9]=2;
        this.arrayBoard = arrayBoard;
    }
    
    public void setPosisi2(int [][] arrayBoard){
        arrayBoard[2][8]=2;
        arrayBoard[7][6]=2;
        arrayBoard[8][1]=2;
        arrayBoard[1][0]=2;
        this.arrayBoard = arrayBoard;
    }
    
    public void setPosisi3(int [][] arrayBoard){
        arrayBoard[8][5]=2;
        arrayBoard[6][3]=2;
        arrayBoard[3][2]=2;
        arrayBoard[4][8]=2;
        this.arrayBoard = arrayBoard;
    }
    
    public Point getPosisiAtas(){
        return posisiAtas;
    }
    
    public Point getPosisiBawah(){
        return posisiBawah;
    }
    
    
    public boolean cekTangga(Point posisi){
        if(this.arrayBoard[posisi.getX()][posisi.getY()]==2){
            return true;
        }else{
            return false;
        }
    }
}
